<!DOCTYPE html>
<html>
<head>
	<title>销售-客户统计</title>
	<#include "../common.ftl">
</head>
<body class="childrenBody">

<div class="layui-fluid">
	<div class="layui-row">
				<form class="layui-form" >
					<blockquote class="layui-elem-quote quoteBox">
						<form class="layui-form">
							<fieldset class="layui-elem-field site-demo-button" >
								<legend>销售-客户统计</legend>
								<br/>
								<div class="layui-row layui-col-space1">
									<div class="layui-col-xs3">
										<div class="layui-input-inline">
											<button type="button" class="layui-btn layui-btn-normal addNews_btn" id="openCustomerDialog"  lay-event="add">
												<i class="layui-icon">&#xe608;</i>
												选择客户
											</button>
										</div>
										<div class="layui-input-inline" style="width: 60px;">
											<input type="text" id="customerId" name="customerId"
												   class="layui-input searchVal" readonly placeholder="客户Id" />
										</div>
										<div class="layui-input-inline" style="width: 80px;">
											<input type="text" id="customerName" name="customerName"
												   class="layui-input searchVal" readonly placeholder="客户名称" />
										</div>
									</div>
									<div class="layui-col-xs2">
										<label class="layui-form-label">开始日期</label>
										<div class="layui-input-block">
											<input type="text" name="startDate" id="startDate" lay-verify="startDate"
												   placeholder="yyyy-MM-dd" autocomplete="off" readonly="readonly" class="layui-input">
										</div>
									</div>
									<div class="layui-col-xs2">
										<label class="layui-form-label">结束日期</label>
										<div class="layui-input-block">
											<input type="text" name="endDate" id="endDate" lay-verify="endDate"
												   placeholder="yyyy-MM-dd" autocomplete="off" readonly="readonly" class="layui-input">
										</div>
									</div>
									<div class="layui-col-xs2">
										<label class="layui-form-label">单据状态</label>
										<div class="layui-input-block">
											<select id="state" name="state"   class="select">
												<option value="" >全部</option>
												<option value="0" >未付款</option>
												<option value="1" >部分付款</option>
												<option value="2" >已付款</option>
											</select>
										</div>
									</div>
									<div class="layui-col-xs2">
										<label class="layui-form-label"></label>
										<a class="layui-btn search_btn" data-type="reload"><i
													class="layui-icon">&#xe615;</i> 搜索</a>
									</div>
								</div>
							</fieldset>
						</form>
					</blockquote>
					<table id="customerList" class="layui-table"  lay-filter="customerList"></table>
					<script id="customerListBar" type="text/html">
						<a class="layui-btn layui-btn-xs" id="edit" lay-event="search">详情</a>
						{{#  if(d.state != 2){ }}
							<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="check">结算</a>
						{{#  } else { }}

						{{#  } }}
					</script>
				</form>
	</div>

	<div class="layui-row">
		<fieldset class="layui-elem-field layui-field-title" >
			<legend>商品信息</legend>
			<table id="listGoods" class="layui-table"  lay-filter="listGoods"></table>
		</fieldset>
		<hr class="layui-border-orange">
		<fieldset class="layui-elem-field layui-field-title" >
			<legend>付款信息</legend>
			<table id="saleListPaymentList" class="layui-table"  lay-filter="saleListPaymentList"></table>
			<#--操作-->
			<script id="saleListPaymentListBar" type="text/html">
				{{#  if(d.state !=2 && d.orderNo == 1){ }}
					<a class="layui-btn layui-btn-xs" id="edit" lay-event="edit">编辑</a>
					<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
				{{#  } else { }}

				{{#  } }}
			</script>
		</fieldset>
	</div>

</div>

<script type="text/javascript" src="${ctx.contextPath}/js/count/customer.js"></script>
</body>
</html>
